const hx = require("hbuilderx");
const main = require('./src/app.js');
const fs = require('fs');
const path = require('path');
const _log=console.log;
console.log=function(){
	//正式环境写到日志文件里
	const filepath=path
		.join(path.resolve(__dirname),'console.log');
	if(typeof arguments === 'string'){
		fs.appendFileSync(filepath,arguments+'\n','utf8')
	}else{
		fs.appendFileSync(filepath,JSON.stringify(arguments)+'\n','utf8')
	}
	_log(arguments)
}
function activate(context) {
	let disposable = hx.commands
		.registerCommand('uniClound.functiontester', 
		main);
	context.subscriptions.push(disposable);	
}
function deactivate() {

}

module.exports = {
	activate,
	deactivate
}
